<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge" />
        <title>动画序列</title>
        <style>
            /* from to 等价于  0% 和  100% */
            /* @keyframes move {
            from {
                transform: translate(0, 0);
            }
            to {
                transform: translate(1000px, 0);
            }
        } */
            /* 动画序列 */
            /* 1. 可以做多个状态的变化 keyframe 关键帧 */
            /* 2. 里面的百分比要是整数 */
            /* 3. 里面的百分比就是总的时间（这个案例是10s）的划分 25% * 10  =  2.5s */

            @keyframes move {
                0% {
                    transform: translate(0, 0);
                }
                25% {
                    transform: translate(1000px, 0);
                }
                50% {
                    transform: translate(1000px, 500px);
                }
                75% {
                    transform: translate(0, 500px);
                }
                100% {
                    transform: translate(0, 0);
                }
            }

            div {
                width: 100px;
                height: 100px;
                background-color: pink;
                animation-name: move;
                animation-duration: 10s;
            }
        </style>
    </head>

    <body>
        <div></div>
    </body>
</html>
